﻿package mortal.game.resource.info
{
    import Message.Client.*;
    import Message.DB.Tables.*;

    public class BossInfo extends TBoss
    {
        private var _isInitTalks:Boolean = false;
        public var talkBirthId:int;
        public var talkNormalId:int;
        public var talkFightId:int;
        public var talkLifeId:int;
        public var talkLifeMin:int;
        public var talkLifeMax:int;

        public function BossInfo()
        {
            return;
        }// end function

        public function initTalk() : void
        {
            var _loc_1:Array = null;
            var _loc_2:int = 0;
            var _loc_3:Array = null;
            if (!this._isInitTalks)
            {
                if (this.topTalk)
                {
                    _loc_1 = this.topTalk.split("&");
                    _loc_2 = 0;
                    while (_loc_2 < _loc_1.length)
                    {
                        
                        _loc_3 = String(_loc_1[_loc_2]).split("#");
                        switch(int(_loc_3[0]))
                        {
                            case EBossTalkType._EBossTalkTypeNormal:
                            {
                                this.talkNormalId = int(_loc_3[1]);
                                break;
                            }
                            case EBossTalkType._EBossTalkTypeBirth:
                            {
                                this.talkBirthId = int(_loc_3[1]);
                                break;
                            }
                            case EBossTalkType._EBossTalkTypeFight:
                            {
                                this.talkFightId = int(_loc_3[1]);
                                break;
                            }
                            case EBossTalkType._EBossTalkTypeLife:
                            {
                                this.talkLifeId = int(_loc_3[1]);
                                this.talkLifeMin = int(_loc_3[2]);
                                this.talkLifeMax = int(_loc_3[3]);
                                break;
                            }
                            default:
                            {
                                break;
                            }
                        }
                        _loc_2++;
                    }
                }
            }
            return;
        }// end function

    }
}
